﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EyFramework.Common;

namespace EyFramework.ORM
{
    public class BaseDaoTj<T> : BaseDao<T>, IBaseTjDao<T> where T : class, new()
    {
        /// <summary>
        /// 实现获取那个数据库连接配置
        /// </summary>
        /// <returns></returns>
        public override string GetConnKey()
        {
            return Constants.CONNECT_TYPE_TJ;
        }

        public void BeginTrans()
        {
            Db.Ado.BeginTran();
        }

        public void CommitTrans()
        {
            Db.Ado.CommitTran();
        }

        public void RollBackTrans()
        {
            Db.Ado.RollbackTran();
        }
    }
}